import request from "@/utils/request";

export function selectCustomerConfig(params) {
  return request({
    url: `/insurance/api/v1/customerConfigs/selectCustomerConfig`,
    method: "get",
    params
  });
}
export function selectCustomerCompanyConfig(params) {
  return request({
    url: `/insurance/api/v1/customerConfigs/selectCustomerCompanyConfig`,
    method: "get",
    params
  });
}

export function getOrderList(params) {
  return request({
    url: `/insurance/api/v1/orders`,
    method: "get",
    params
  });
}
export function reUpload(data) {
  return request({
    url: `/insurance/api/v1/orders/reUpload`,
    method: "put",
    data
  });
}

export function recordList(params) {
  return request({
    url: `/insurance/api/v1/orderCirculations`,
    method: "get",
    params
  });
}
export function selectCompanyBySiteId(siteId) {
  return request({
    url: `/insurance/api/v1/companies/selectCompanyBySiteId/${siteId}`,
    method: "get"
  });
}
export function selectCompanyById(id) {
  return request({
    url: `/insurance/api/v1/companies/selectCompanyById/${id}`,
    method: "get"
  });
}
export function addorder(data) {
  return request({
    url: `/insurance/api/v1/orders`,
    method: "post",
    data
  });
}
export function getDetailByOrderId(orderId, type) {
  return request({
    url: `/insurance/api/v1/orders/${orderId}/${type}`,
    method: "get"
  });
}

export function topStatistic(params) {
  return request({
    url: `/insurance/api/v1/orders/topStatistic`,
    method: "get",
    params
  });
}
export function undoOrder(orderId) {
  return request({
    url: `/insurance/api/v1/orders/undoOrder/${orderId}`,
    method: "put"
  });
}
export function companyAudit(data) {
  return request({
    url: `/insurance/api/v1/orders/companyAudit`,
    method: "put",
    data
  });
}
export function getDownloadFile(params) {
  return request({
    url: `/file/api/v1/general/download`,
    method: "get",
    params
  });
}
